// #pragma once
#ifndef __MYFILE_H__
#define __MYFILE_H__
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>

#define FLUSH_NOW 1
#define FLUSH_LINE 2
#define FLUSH_ALL 4
#define SIZE_BUFFER 1024
typedef struct IO_FILE {
   int fileno;
   int flag;
   char out_buffer[SIZE_BUFFER];
   int out_pos;
}_FILE;

_FILE* _fopen(const char* pathname, const char* flag);
int _fwrite(_FILE* fp, const char* s, int len); 
void _fclose(_FILE* fp);

#endif
